﻿<Window x:Class="RuliChainCodeImageGenerator.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow"
        Width="900" Height="800">
    <Border BorderBrush="Black" BorderThickness="2" Margin="2">
        <Grid Background="LightGray" >
            <Grid.RowDefinitions>
                <RowDefinition Height="5" />
                <RowDefinition Height="80" />
                <RowDefinition Height="45" />
                <RowDefinition Height="*" MaxHeight="800" />
                <RowDefinition Height="45" />
                <RowDefinition Height="5" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100" />
                <ColumnDefinition Width="*" MaxWidth="800" />
            </Grid.ColumnDefinitions>
            
            <Border BorderBrush="Black" BorderThickness="1" Grid.Row="3" Grid.ColumnSpan="2" Margin="5">
                <Image Stretch="Fill"  Name="m_ImgRuli" VerticalAlignment="Top"/>
            </Border>
            
            <Button Content="save image" Height="35" Margin="5" HorizontalAlignment="Right" Name="btSave" Grid.Column="1" Grid.Row="4" VerticalAlignment="Bottom" Width="135" Click="btSave_Click" />
            
            <TextBox Name="tbRuliInput" TextWrapping="Wrap" AcceptsReturn="True" Grid.Column="1" Grid.Row="1" Margin="5" />
            <Label Content="RULI Chain Code:" Height="28" HorizontalAlignment="Left" Name="label1" VerticalAlignment="Top" Grid.Row="1" />
            <Button Margin="5" Grid.Row="2" Content="create BW image" Height="35" Name="btCreateImage" VerticalAlignment="Top" Grid.Column="1" 
                    Width="135" HorizontalAlignment="Right" Click="btCreateImage_Click" />
            <Label Content="Bitmask Size:" Grid.Row="2" Height="28" HorizontalAlignment="Left" Margin="6,10,0,0" Name="label2" VerticalAlignment="Top" />
            <ComboBox Grid.Column="1" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="5,15,0,0" 
                      Name="cbBitMask" VerticalAlignment="Top" Width="71" DisplayMemberPath="Title" SelectedValuePath="Size" SelectionChanged="cbBitMask_SelectionChanged" />
        </Grid>
    </Border>
</Window>
